//
//  HotModel.m
//  FloatClouds
//
//  Created by 黄威 on 16/08/31
//  Copyright (c) __ORGANIZATIONNAME__. All rights reserved.
//

#import "HotModel.h"
#import "Hot_image_Model.h"
#import "Hot_ViewPoint_Model.h"
#import "Hot_New_Model.h"


@implementation HotModel

- (void)setValue:(id)value forKey:(NSString *)key {
    
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"top_big_photo_cigarettes"]) {
        NSMutableArray*listArray = [NSMutableArray array];
        
      
      
        for (NSDictionary *dic in value) {
            
            Hot_image_Model *newlist = [Hot_image_Model modelWithDic:dic];
           
            [listArray addObject:newlist];
        
        }
        _top_big_photo_cigarettes = listArray;
        
    }
    if([key isEqualToString:@"new_arrival_cigarettes"]) {
        NSMutableArray*listArray = [NSMutableArray array];
        
        NSArray *array = [NSArray array];
        array = value;
       
        for (NSDictionary *dic in value) {
            
            Hot_New_Model *newlist = [Hot_New_Model modelWithDic:dic];
            
            [listArray addObject:newlist];
        }
        _nnew_arrival_cigarettes = listArray;
        
       
        
        
    }
     if  ([key isEqualToString:@"hot_viewpoints"]) {
        NSMutableArray*listArray = [NSMutableArray array];
        
       
        for (NSDictionary *dic in value) {
            Hot_ViewPoint_Model  *newlist = [Hot_ViewPoint_Model modelWithDic:dic];
            [listArray addObject:newlist];
        }
        _hot_viewpoints = listArray;}
     

}


@end
